package com.mocksamples.greeting;

public class Greeting {
	private Translator translator; 
	private final String HELLO = "Hello";
	public Greeting(Translator translator) {
		this.translator = translator;
	}
	public String sayHello(String language, String name) {
		String message = HELLO;
		// no need to call translator if the language is English 
		if (!language.equals("English")){
			message = translator.translate("English", language, HELLO );
		}
		return message + " " + name;	
	}
}
	

